home *** CD-ROM | disk | FTP | other *** search
/ Clickx 53 / Clickx 53.iso / software / onmisbaretool / feedreaderv313 / stylesheet / atom.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2008-01-01  |  7.1 KB  |  276 lines

  1. ∩╗┐<?xml version="1.0" ?>
  2.  
  3. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  4.                 xmlns:feed="http://www.w3.org/2005/Atom"
  5.                 xmlns:frc="http://www.feedreader.com/ns/3.0/frc"
  6.                 xmlns:fr="http://www.feedreader.com/ns/3.0"
  7.                 version="1.0">
  8. <xsl:output method="html" />
  9.  
  10. <xsl:template match="/">
  11.  
  12. <html>
  13.   <head>
  14.     <title><xsl:value-of select="/feed:feed/feed:title"/></title>
  15.     <link rel="stylesheet" href="atom.css"/>
  16.     <style>
  17.  
  18. body {
  19.  font-family: verdana, tahoma;
  20.  font-size: 0.7em;
  21.  line-height: 1.3em;
  22.  padding: 0;
  23.  margin: 0;
  24. }
  25.  
  26.  
  27. a, a:link, a:active, a:visited {
  28.  text-decoration: none;
  29.  color: #0088ff;
  30. }
  31.  
  32. div.entry {
  33.  padding: 0 20px 20px 25px;
  34.  border-bottom: 1px solid #ddd;
  35. }
  36.  
  37. div.content img {
  38. }
  39.  
  40. div.active {
  41.  background-color: #f1f5fa;;
  42. }
  43.  
  44. .read .title a {
  45.  color: #aaa;
  46. }
  47.  
  48.  
  49. .read .content {
  50.  color: #555;
  51. }
  52.  
  53. div.entry .read .title a {
  54.  color: gray;
  55. }
  56.  
  57. .header {
  58.  padding-top: 20px;
  59.  margin: 0 0 0.2em 0;
  60. }
  61.  
  62. .title {
  63.  font-size: 1.6em;
  64.  font-family: arial, verdana, tahoma;
  65.  font-weight: bold;
  66.  letter-spacing: -1px;
  67.  line-height: 1.1em;
  68. }
  69.  
  70. div.details {
  71.  color: gray;
  72.  margin-bottom: 0.5em;
  73. }
  74. div.clear {
  75.  clear:both;
  76.  height: 1px;
  77.  width: 1px;
  78.  font-size: 1px;
  79.  line-height: 1px;
  80. }
  81. span.modified, span.author, span.category {
  82. }
  83.  
  84. .starred a {
  85.  display:block;
  86.  line-height: 0;
  87.  font-size: 0;
  88.  width: 12px; 
  89.  height: 12px;
  90.  background-image: url('<xsl:value-of select="/feed:feed/fr:imagebase"/>stylesheet/starred.png');
  91.  background-repeat: no-repeat;
  92. }
  93.  
  94. .unstarred a {
  95.  display:block;
  96.  line-height: 0;
  97.  font-size: 0;
  98.  width: 12px; 
  99.  height: 12px;
  100.  background-image: url('<xsl:value-of select="/feed:feed/fr:imagebase"/>stylesheet/unstarred.png');
  101.  background-repeat: no-repeat;
  102. }
  103.  
  104.  
  105. .status a {
  106.  display:block;
  107.  line-height: 0;
  108.  font-size: 0;
  109.  width: 8px; 
  110.  height: 8px;
  111.  margin-top: -1.5em;
  112.  background-image: url('<xsl:value-of select="/feed:feed/fr:imagebase"/>stylesheet/unread_8x8.png');
  113.  background-repeat: no-repeat;
  114. }
  115.  
  116. .read .status a {
  117.  background-image: url('<xsl:value-of select="/feed:feed/fr:imagebase"/>stylesheet/read_8x8.png');
  118. }
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125. </style>
  126. <base>    
  127. <xsl:attribute name="href"><xsl:value-of select="/feed:feed/feed:entry/feed:source/feed:link[@rel='alternate'][1]/@href"/>/</xsl:attribute>
  128. </base> 
  129.   </head>    
  130.   <body>
  131.   <script type="text/javascript">
  132.   var imagebase='file://<xsl:value-of select="/feed:feed/fr:imagebase"/>';
  133.   </script>
  134.   <xsl:apply-templates select="feed:feed"/>
  135.   </body>
  136. </html>
  137. </xsl:template>
  138.  
  139. <xsl:template match="feed:feed">
  140.   <xsl:value-of disable-output-escaping="yes" select="fr:opmldescr"/>
  141.   <xsl:apply-templates select="feed:entry"/>
  142. </xsl:template>
  143.  
  144. <xsl:template match="feed:entry">
  145.  
  146.     <div class="entry">
  147.         <xsl:attribute name="id">article<xsl:value-of select="fr:item_id"/></xsl:attribute>
  148.         <xsl:if test="fr:rtlEnabled = 1">
  149.             <xsl:attribute name="style">direction:RTL;font-size: 1.1em;font-family: tahoma;</xsl:attribute>
  150.         </xsl:if>
  151.         <xsl:if test="fr:status = 1">
  152.             <xsl:attribute name="class">entry read</xsl:attribute>
  153.         </xsl:if>
  154.                 
  155.         <div class="header">
  156.         <span class="title">
  157.         <xsl:choose>
  158.                 <xsl:when test="string-length(feed:link/@href)>0">
  159.               <a>
  160.             <xsl:attribute name="href"><xsl:value-of select="feed:link/@href"/></xsl:attribute>
  161.             <xsl:value-of select="feed:title"/>
  162.             </a>
  163.                 </xsl:when>
  164.                 <xsl:otherwise>
  165.             <xsl:value-of select="feed:title"/>
  166.                 </xsl:otherwise>
  167.                  </xsl:choose>
  168.         </span>
  169.  
  170.           <span class="status">
  171.           <xsl:attribute name="style">float:right;</xsl:attribute>
  172.           <xsl:if test="fr:rtlEnabled = 1">
  173.             <xsl:attribute name="style">float:left;</xsl:attribute>
  174.           </xsl:if>
  175.           <xsl:if test="fr:rtlEnabled != 1">
  176.             <xsl:attribute name="style">float:right;</xsl:attribute>
  177.           </xsl:if>
  178.           
  179.           <a>
  180.              
  181.           <xsl:attribute name="id">togglelink<xsl:value-of select="fr:item_id"/></xsl:attribute>
  182.             <xsl:attribute name="href">fr:toggleread/<xsl:value-of select="fr:item_id"/></xsl:attribute>
  183.           <xsl:attribute name="onclick">this.blur();</xsl:attribute>
  184.                    
  185.           </a>
  186.           </span>
  187.         </div>
  188.     
  189.                 <div class="details">
  190.         <span>
  191.         <xsl:attribute name="id">star<xsl:value-of select="fr:item_id"/></xsl:attribute>
  192.         <xsl:if test="fr:flag = 1">
  193.             <xsl:attribute name="class">starred</xsl:attribute>
  194.         </xsl:if>
  195.         <xsl:if test="fr:flag != 1">
  196.             <xsl:attribute name="class">unstarred</xsl:attribute>
  197.         </xsl:if>
  198.         <xsl:attribute name="style">float:left;</xsl:attribute>
  199.           
  200.           <a>
  201.              
  202.           <xsl:attribute name="id">togglestar<xsl:value-of select="fr:item_id"/></xsl:attribute>
  203.             <xsl:attribute name="href">fr:togglestar/<xsl:value-of select="fr:item_id"/></xsl:attribute>
  204.           <xsl:attribute name="onclick">this.blur();</xsl:attribute>
  205.                    
  206.           </a>
  207.         </span>
  208.  
  209. <span class="updated"><xsl:value-of select="fr:updated"/>, </span>        
  210.             <xsl:if test="feed:author"> 
  211.                   <span class="author">
  212.                 <xsl:apply-templates select="feed:author"/>
  213.                 </span>
  214.             </xsl:if>
  215.             <a>
  216.             <xsl:attribute name="href">fr:edittags/<xsl:value-of select="fr:item_id"/></xsl:attribute>
  217.  
  218.             <img>
  219.             <xsl:attribute name="border">0</xsl:attribute>
  220.             <xsl:attribute name="hspace">5</xsl:attribute>
  221.             <xsl:attribute name="src">file://<xsl:value-of select="/feed:feed/fr:imagebase"/>stylesheet/tag_edit.png</xsl:attribute>
  222.             </img>
  223.             </a>
  224.                         
  225.             <xsl:if test="feed:category">
  226.                   <span class="category"> 
  227.                   <xsl:apply-templates select="feed:category"/>
  228.                 </span>
  229.                     </xsl:if>
  230.             <xsl:if test="feed:source">
  231.                   <span class="source"> 
  232.                 <a>
  233.                 <xsl:attribute name="href">fr:feed/<xsl:value-of select="feed:source/fr:feed_id"/></xsl:attribute>
  234.                 <xsl:value-of select="feed:source/feed:title"/>
  235.                 </a>
  236.                 <a>
  237.                 <xsl:attribute name="href">
  238.                 <!-- <xsl:for-each select = "feed:source/feed:link[@rel='alternate']"> --> 
  239.                     <xsl:value-of select = "feed:source/feed:link[@rel='alternate'][1]/@href"/> 
  240.                     <!-- </xsl:for-each> -->
  241.                 </xsl:attribute>
  242.                       
  243.             <img>
  244.             <xsl:attribute name="border">0</xsl:attribute>
  245.             <xsl:attribute name="hspace">5</xsl:attribute>
  246.             <xsl:attribute name="src">file://<xsl:value-of select="/feed:feed/fr:imagebase"/>stylesheet/world_go.png</xsl:attribute>
  247.             </img>
  248.                 </a>                                  
  249.                 </span>
  250.                                 
  251.                     </xsl:if>
  252.         </div>
  253.  
  254.     <xsl:if test="feed:content">
  255.         <div class="content">
  256.             <xsl:value-of disable-output-escaping="yes" select="feed:content"/>
  257.         </div>
  258.     </xsl:if>
  259.     <div class="clear" />
  260.     </div>
  261.  
  262. </xsl:template>
  263.  
  264. <xsl:template match="feed:category">
  265.   <a>
  266.   <xsl:attribute name="href">fr:<xsl:value-of select="./@scheme"/></xsl:attribute>
  267.   <xsl:value-of select="./@term"/>
  268.   </a>, 
  269. </xsl:template>
  270.  
  271. <xsl:template match="feed:author">
  272.   <xsl:value-of select="feed:name"/>, 
  273. </xsl:template>
  274.  
  275. </xsl:stylesheet>
  276.